Path 1: 14 calls (0.45)

Layout.__rich_repr__ def (14)

('name', 'bar') (4) ('name', 'foo') (4) ('name', 'right') (2) ('name', 'root') (2) ('size', 2) (2)

1def iter_rich_args(rich_args: Any) -> Iterable[Union[Any, Tuple[str, Any]]]:
2            for arg in rich_args:
3                if _safe_isinstance(arg, tuple):
4                    if len(arg) == 3:
5                        key, child, default = arg
6                        if default == child:
7                            continue
8                        yield key, child
9                    elif len(arg) == 2:
10                        key, child = arg
11                        yield key, child
12                    elif len(arg) == 1:
13                        yield arg[0]
14                else:
15                    yield arg
            

Path 2: 10 calls (0.32)

test_reference_cycle_custom_repr..Example.__rich_repr__ def (6) test_max_depth_rich_repr..Foo.__rich_repr__ def (2) test_max_depth_ric...

tuple (8) ('x', 1) (3) ('x', 2) (3) ('y', None) (2)

1def iter_rich_args(rich_args: Any) -> Iterable[Union[Any, Tuple[str, Any]]]:
2            for arg in rich_args:
3                if _safe_isinstance(arg, tuple):
4                    if len(arg) == 3:
5                        key, child, default = arg
6                        if default == child:
7                            continue
8                        yield key, child
9                    elif len(arg) == 2:
10                        key, child = arg
11                        yield key, child
12                    elif len(arg) == 1:
13                        yield arg[0]
14                else:
15                    yield arg
            

Path 3: 5 calls (0.16)

Layout.__rich_repr__ def (4) test_tuple_rich_repr_default..Foo.__rich_repr__ def (1)

1def iter_rich_args(rich_args: Any) -> Iterable[Union[Any, Tuple[str, Any]]]:
2            for arg in rich_args:
3                if _safe_isinstance(arg, tuple):
4                    if len(arg) == 3:
5                        key, child, default = arg
6                        if default == child:
7                            continue
8                        yield key, child
9                    elif len(arg) == 2:
10                        key, child = arg
11                        yield key, child
12                    elif len(arg) == 1:
13                        yield arg[0]
14                else:
15                    yield arg
            

Path 4: 1 calls (0.03)

Foo.__rich_repr__ def (1)

'hello' (1) (None, 'hello') (1) ('bar', 3) (1) ('egg', 1) (1)

1def iter_rich_args(rich_args: Any) -> Iterable[Union[Any, Tuple[str, Any]]]:
2            for arg in rich_args:
3                if _safe_isinstance(arg, tuple):
4                    if len(arg) == 3:
5                        key, child, default = arg
6                        if default == child:
7                            continue
8                        yield key, child
9                    elif len(arg) == 2:
10                        key, child = arg
11                        yield key, child
12                    elif len(arg) == 1:
13                        yield arg[0]
14                else:
15                    yield arg
            

Path 5: 1 calls (0.03)

Bar.__rich_repr__ def (1)

'hello' (1) (None, 'hello') (1) ('bar', 3) (1) ('egg', 1) (1)

1def iter_rich_args(rich_args: Any) -> Iterable[Union[Any, Tuple[str, Any]]]:
2            for arg in rich_args:
3                if _safe_isinstance(arg, tuple):
4                    if len(arg) == 3:
5                        key, child, default = arg
6                        if default == child:
7                            continue
8                        yield key, child
9                    elif len(arg) == 2:
10                        key, child = arg
11                        yield key, child
12                    elif len(arg) == 1:
13                        yield arg[0]
14                else:
15                    yield arg